package alit.generator.bl.populator;

import alit.generator.bl.generator.Context;

import java.util.Random;

/**
 * User: Alexander Litvinenko
 * Date: 11/19/11
 * Time: 12:39 PM
 */
public class BitPopulatorKit extends PopulatorKit {

    public static final String TYPE = "bit";

    public static class FromAllRangePopulator implements IPopulator {

        public static String getId() {
            return "fromAllRange";
        }

        public String populate(Context context) {
            Random random = new Random();
            String[] range = {"0", "1"};
            return range[random.nextInt(range.length)];
        }
    }

    @Override
    public String getSqlDialect() {
        return DialectUtils.MS_SQL_SERVER;
    }

    @Override
    public String getTypeName() {
        return TYPE;
    }
}